//
//  HYSearchGameHeader.m
//  HaiYue
//
//  Created by skyline on 2018/6/4.
//  Copyright © 2018年 skyline. All rights reserved.
//

#import "HYSearchGameHeader.h"
CGFloat const HYSearchGameCellHeaderHight = 25;
@interface HYSearchGameHeader()
@property (nonatomic, strong) HYFillLabel *lable;
@end
@implementation HYSearchGameHeader
- (instancetype)init
{
    self = [super init];
    if (self)
    {
        
    }
    return self;
}

- (HYFillLabel *)lable
{
    if (!_lable)
    {
        _lable = [[HYFillLabel alloc]initWithFrame:CGRectMake(0, 0, 60, HYSearchGameCellHeaderHight)
                                  typeOfshapeLayer:CCShapeLayerTypeRightHalfEllipse
                                         attribute:@{HYTextColor:[UIColor whiteColor],HYTextFont:[UIFont systemFontOfSize:13]}];
        [self addSubview:_lable];
        [_lable mas_updateConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self);
            make.left.equalTo(self);
            make.size.mas_equalTo(self.lable.bounds.size);
        }];
    }
    return _lable;
}

- (void)setTitle:(NSString *)title
{
    if (_title != title)
    {
        _title = title;
        self.lable.text = title;
    }
}
@end
